package com.example.demo;


import org.springframework.boot.autoconfigure.SpringBootApplication;

//String int 相互转换  demo文件
@SpringBootApplication
public class IntTurnString {
    public static void main(String args[]){
        String str = "232425";
        int in = 10000000;
        String China = "你好n";

        //String转int 2种
        Integer integer1 = new Integer(str);
        System.out.println(integer1.intValue());

        System.out.println(Integer.parseInt(str));



        //打印值为 0
        int in0 = 000000;
        System.out.println(String.valueOf(in0));
        System.out.println();

        //int 转 String  4种
        System.out.println(String.valueOf(in));

        System.out.println(Integer.toString(in));

        System.out.println(""+in);
        System.out.println(in+str);
        System.out.println(in+str+China);

        Integer integer = new Integer(in);
        System.out.print(integer.toString());


    }
}
